//
//  BaseTabbar.m
//  YLMainStructure
//
//  Created by Apple on 2017/9/27.
//  Copyright © 2017年 Apple. All rights reserved.
//

#import "BaseTabbar.h"

@implementation BaseTabbar
- (instancetype)initWithFrame:(CGRect)frame
{
    if(self = [super initWithFrame:frame]){
        // 设置样式, 去除tabbar上面的黑线
        //self.barStyle = UIBarStyleBlack;
        
        NSMutableDictionary *dictNormal = [NSMutableDictionary dictionary];
        [dictNormal setValue: [UIColor whiteColor] forKey:NSForegroundColorAttributeName];
        [dictNormal setValue: [UIFont systemFontOfSize:14.0] forKey:NSFontAttributeName];
        [[UITabBarItem appearance] setTitleTextAttributes:dictNormal forState:UIControlStateNormal];
        
        NSMutableDictionary *dictSelect = [NSMutableDictionary dictionary];
        [dictSelect setValue: [UIColor blackColor] forKey:NSForegroundColorAttributeName];
        [dictSelect setValue: [UIFont systemFontOfSize:14.0] forKey:NSFontAttributeName];
        [[UITabBarItem appearance] setTitleTextAttributes:dictSelect forState:UIControlStateSelected];
    }
    return self;
}

@end
